package com.zhangtai.modules.dao.ssqlDao;


//import com.zhangtai.datasource.annotation.DataSource;
//import com.zhangtai.modules.entity.employee.EmployeeInfoEntity;
//import com.zhangtai.modules.entity.system.UserEntity;
//import org.apache.ibatis.annotations.Mapper;
//import org.apache.ibatis.annotations.Param;
//import org.apache.ibatis.annotations.Select;
//
//import java.util.List;
//
//@Mapper
//public interface BpmUserDao {
//
//    @DataSource("slave1")
//    @Select("select top 1 * from bpm_user where usercode=#{userCode} ORDER BY dimissiontime DESC")
//    public String findOrgIdByUserCode(String userCode);
//
//
//
//    @DataSource("slave1")
//    @Select("select \n" +
//            "e.C_OID as oid,\n" +
//            "e.C_CODE as code,\n" +
//            "e.C_NAME as name,\n" +
//            "e.C_GENDER as gender,\n" +
//            "e.C_HIREDATE as hiredate,\n" +
//            "e.C_BEGINWORKDATE as beginworkdate,\n" +
//            "e.C_NATION as nation,\n" +
//            "e.C_NATIONALITY as nationality,\n" +
//            "e.C_POLITY as polity,\n" +
//            "e.C_MARITAL as marital,\n" +
//            "e.C_KNOWLEDGE as degree,\n" +
//            "e.C_DEGREE as education,\n" +
//            "e.c_specialty as speciality,\n" +
//            "e.C_BIRTHDAY as birthday,\n" +
//            "e.C_IDCARD as idcard,\n" +
//            "e.C_REGRESIDENCE as regresidence,\n" +
//            "s.C_RECORDTIME as dimissiondate ,\n" +
//            "e.C_HIREINFO as jobType,\n" +
//            "e.C_ORGID as orgId,\n" +
//            "e.C_UNITID as unitId,\n" +
//            "e.C_JOBID as jobId,\n" +
//            "deptname as unitname,\n" +
//            "orgname as orgname,\n" +
//            "e.C_JOBNAME as jobname,\n" +
//            "e.C_MYPHONE as mobile,\n" +
//            "e.C_EMAIL as privatemail,\n" +
//            "e.C_EMPLOYEESTATUS as employeestatus,\n" +
//            "e.C_HEALTH as healthstatus,\n" +
//            "e.C_ADDRESS as address,\n" +
//            "e.C_ZHUANZHENG as regular_day,\n" +
//            "case e.c_tuiwu when '0' then '1' when '2' then '2' end as disbandment,\n" +
//            "管理职级ＩＤ as managementJoblevelId,\n" +
//            "专业职级ＩＤ as professionJoblevelId,\n" +
//            "useraccount\n" +
//            "from tb_inf_employee e  with(nolock)\n" +
//            "left join (select c_recordtime,C_EMPOID from tb_per_staffrecord with(nolock) where C_RECORDTYPE in (4,6,5,8)) s on s.C_EMPOID = e.C_EMPLOYEEID\n" +
//            "left join  bpm_user d on e.C_CODE =d.usercode\n" +
//            "where C_EMPLOYEESTATUS in (2,9,11)\n" +
//            "and e.c_code=#{code}")
//    public EmployeeInfoEntity findEmpByCodeFromMssql(@Param("code")String code);
//
//    @DataSource("slave1")
//    @Select("select \n" +
//            "e.C_OID as oid,\n" +
//            "e.C_CODE as code,\n" +
//            "e.C_NAME as name,\n" +
//            "e.C_GENDER as gender,\n" +
//            "e.C_HIREDATE as hiredate,\n" +
//            "e.C_BEGINWORKDATE as beginworkdate,\n" +
//            "e.C_NATION as nation,\n" +
//            "e.C_NATIONALITY as nationality,\n" +
//            "e.C_POLITY as polity,\n" +
//            "e.C_MARITAL as marital,\n" +
//            "e.C_KNOWLEDGE as degree,\n" +
//            "e.C_DEGREE as education,\n" +
//            "e.c_specialty as speciality,\n" +
//            "e.C_BIRTHDAY as birthday,\n" +
//            "e.C_IDCARD as idcard,\n" +
//            "e.C_REGRESIDENCE as regresidence,\n" +
//            "s.C_RECORDTIME as dimissiondate ,\n" +
//            "e.C_HIREINFO as jobType,\n" +
//            "e.C_ORGID as orgId,\n" +
//            "e.C_UNITID as unitId,\n" +
//            "e.C_JOBID as jobId,\n" +
//            "deptname as unitname,\n" +
//            "orgname as orgname,\n" +
//            "e.C_JOBNAME as jobname,\n" +
//            "e.C_MYPHONE as mobile,\n" +
//            "e.C_EMAIL as privatemail,\n" +
//            "e.C_EMPLOYEESTATUS as employeestatus,\n" +
//            "e.C_HEALTH as healthstatus,\n" +
//            "e.C_ADDRESS as address,\n" +
//            "e.C_ZHUANZHENG as regular_day,\n" +
//            "case e.c_tuiwu when '0' then '1' when '2' then '2' end as disbandment,\n" +
//            "管理职级ＩＤ as managementJoblevelId,\n" +
//            "专业职级ＩＤ as professionJoblevelId,\n" +
//            "useraccount\n" +
//            "from tb_inf_employee e  with(nolock)\n" +
//            "left join (select c_recordtime,C_EMPOID from tb_per_staffrecord with(nolock) where C_RECORDTYPE in (4,6,5,8)) s on s.C_EMPOID = e.C_EMPLOYEEID\n" +
//            "left join  bpm_user d on e.C_CODE =d.usercode\n" +
//            "where C_EMPLOYEESTATUS in (2,9,11)\n" +
//            "and e.C_IDCARD=#{idCard}")
//    List<EmployeeInfoEntity> findEmpByIdCardFromMssql(@Param("idCard")String idCard);
//
//
//    @DataSource("slave1")
//    @Select("SELECT\n" +
//            "\tuseraccount username,\n" +
//            "\tusername name,\n" +
//            "\tusercode,\n" +
//            "\tuserphone mobile,\n" +
//            "\tjobname,\n" +
//            "\tdeptname department,\n" +
//            "\torgname,\n" +
//            "\torgid orgi_d,\n" +
//            "\tdeptid dep_id,\n" +
//            "\tjobid job_id \n" +
//            "FROM\n" +
//            "\tbpm_user bu \n" +
//            "WHERE\n" +
//            "\tusercode =#{userCode}")
//    public UserEntity findBpmUserByUserCode(String userCode);
//
//    public static void main(String[] args) {
//        System.out.println("select \n" +
//                "e.C_OID as oid,\n" +
//                "e.C_CODE as code,\n" +
//                "e.C_NAME as name,\n" +
//                "e.C_GENDER as gender,\n" +
//                "e.C_HIREDATE as hiredate,\n" +
//                "e.C_IDCARD as idcard,\n" +
//                "e.C_NATION as nation,\n" +
//                "e.C_NATIONALITY as nationality,\n" +
//                "e.C_POLITY as polity,\n" +
//                "e.C_REGRESIDENCE as regresidence,\n" +
//                "e.C_BIRTHDAY as birthday,\n" +
//                "s.C_RECORDTIME as dimissiondate ,\n" +
//                "e.C_HIREINFO as jobType,\n" +
//                "e.C_ORGID as orgId,\n" +
//                "e.C_UNITID as unitId,\n" +
//                "e.C_JOBID as jobId,\n" +
//                "deptname as unitname,\n" +
//                "orgname as orgname,\n" +
//                "e.C_JOBNAME as jobname,\n" +
//                "e.C_MYPHONE as mobile,\n" +
//                "e.C_EMAIL as privatemail,\n" +
//                "e.C_EMPLOYEESTATUS as employeestatus,\n" +
//                "管理职级ＩＤ as managementJoblevelId,\n" +
//                "专业职级ＩＤ as professionJoblevelId,\n" +
//                "useraccount\n" +
//                "from tb_inf_employee e  with(nolock)\n" +
//                "left join (select c_recordtime,C_EMPOID from tb_per_staffrecord with(nolock) where C_RECORDTYPE in (4,6,5,8)) s on s.C_EMPOID = e.C_EMPLOYEEID\n" +
//                "left join  bpm_user d on e.C_CODE =d.usercode\n" +
//                "where C_EMPLOYEESTATUS in (2,9)\n" +
//                " and e.C_OID=#{oid}");
//    }
//
//
//    @DataSource("slave1")
//    @Select("select \n" +
//            "e.C_OID as oid,\n" +
//            "e.C_CODE as code,\n" +
//            "e.C_NAME as name,\n" +
//            "e.C_GENDER as gender,\n" +
//            "e.C_HIREDATE as hiredate,\n" +
//            "e.C_BEGINWORKDATE as beginworkdate,\n" +
//            "e.C_NATION as nation,\n" +
//            "e.C_NATIONALITY as nationality,\n" +
//            "e.C_POLITY as polity,\n" +
//            "e.C_MARITAL as marital,\n" +
//            "e.C_KNOWLEDGE as degree,\n" +
//            "e.C_DEGREE as education,\n" +
//            "e.c_specialty as speciality,\n" +
//            "e.C_BIRTHDAY as birthday,\n" +
//            "e.C_IDCARD as idcard,\n" +
//            "e.C_REGRESIDENCE as regresidence,\n" +
//            "s.C_RECORDTIME as dimissiondate ,\n" +
//            "e.C_HIREINFO as jobType,\n" +
//            "e.C_ORGID as orgId,\n" +
//            "e.C_UNITID as unitId,\n" +
//            "e.C_JOBID as jobId,\n" +
//            "deptname as unitname,\n" +
//            "orgname as orgname,\n" +
//            "e.C_JOBNAME as jobname,\n" +
//            "e.C_MYPHONE as mobile,\n" +
//            "e.C_EMAIL as privatemail,\n" +
//            "e.C_EMPLOYEESTATUS as employeestatus,\n" +
//            "e.C_HEALTH as healthstatus,\n" +
//            "e.C_ADDRESS as address,\n" +
//            "e.C_ZHUANZHENG as regular_day,\n" +
//            "case e.c_tuiwu when '0' then '1' when '2' then '2' end as disbandment,\n" +
//            "管理职级ＩＤ as managementJoblevelId,\n" +
//            "专业职级ＩＤ as professionJoblevelId,\n" +
//            "useraccount\n" +
//            "from tb_inf_employee e  with(nolock)\n" +
//            "left join (select c_recordtime,C_EMPOID from tb_per_staffrecord with(nolock) where C_RECORDTYPE in (4,6,5,8)) s on s.C_EMPOID = e.C_EMPLOYEEID\n" +
//            "left join  bpm_user d on e.C_CODE =d.usercode\n" +
//            "where  e.c_code=#{code}")
//    public EmployeeInfoEntity findEmployeeByCodeFromMssql(@Param("code")String code);
//
//
//
//
//}
